import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '项目名称',
    align: "center", resizable: true,
    dataIndex: 'projectName'
  },
  {
    title: '申请标题',
    align: "center", resizable: true,
    dataIndex: 'title'
  },
  {
    title: '开票记录',
    align: "center", resizable: true,
    dataIndex: 'applyId_dictText'
  },
  {
    title: '开票状态',
    align: "center", resizable: true,
    dataIndex: 'status'
  },

  // {
  //   title: '项目ID',
  //   align: "center", resizable: true,
  //   dataIndex: 'projectId_dictText'
  // },
  // {
  //   title: '子项目',
  //   align: "center", resizable: true,
  //   dataIndex: 'subProjectId_dictText'
  // },

  {
    title: '税额',
    align: "center", resizable: true,
    dataIndex: 'taxAmount'
  },
  {
    title: '税率',
    align: "center", resizable: true,
    dataIndex: 'taxRate'
  },
  {
    title: '金额',
    align: "center", resizable: true,
    dataIndex: 'amount'
  },
  {
    title: '发票类型',
    align: "center", resizable: true,
    dataIndex: 'invoiceType_dictText'
  },

  {
    title: '审核人',
    align: "center", resizable: true,
    dataIndex: 'reviewerUserId_dictText'
  },
  {
    title: '审核时间',
    align: "center", resizable: true,
    dataIndex: 'reviewTime'
  },

  {
    title: '提交人',
    align: "center", resizable: true,
    dataIndex: 'submitterUserId_dictText'
  },
  {
    title: '提交时间',
    align: "center", resizable: true,
    dataIndex: 'submissionTime'
  },
  {
    title: '财务人',
    align: "center", resizable: true,
    dataIndex: 'financialUserId_dictText'
  },
  {
    title: '财务审核时间',
    align: "center", resizable: true,
    dataIndex: 'financialTime'
  },
  {
    title: '开票记录id',
    align: "center", resizable: true,
    dataIndex: 'applyId_dictText'
  },

];

// 高级查询数据
export const superQuerySchema = {
  status: {title: '开票状态',order: 0,view: 'list', type: 'string',dictCode: '',},
  projectId: {title: '项目ID',order: 1,view: 'list', type: 'string',dictTable: "c_project_application", dictCode: 'id', dictText: 'project_name',},
  subProjectId: {title: '子项目',order: 2,view: 'list', type: 'string',dictTable: "c_sub_project", dictCode: 'id', dictText: 'sub_project_name',},
  projectName: {title: '项目名称',order: 3,view: 'text', type: 'string',},
  taxAmount: {title: '税额',order: 4,view: 'number', type: 'number',},
  invoicer: {title: '开票人姓名',order: 5,view: 'text', type: 'string',},
  taxRate: {title: '税率',order: 6,view: 'number', type: 'number',},
  amount: {title: '金额',order: 7,view: 'number', type: 'number',},
  invoiceType: {title: '发票类型',order: 8,view: 'list', type: 'string',dictCode: 'InvoiceType',},
  remarks: {title: '发票的备注信息',order: 9,view: 'text', type: 'string',},
  sellerName: {title: '销售方名称',order: 10,view: 'text', type: 'string',},
  sellerTaxId: {title: '销售方的统一社会信用代码或纳税人识别号',order: 11,view: 'text', type: 'string',},
  buyerName: {title: '购买方名称',order: 12,view: 'text', type: 'string',},
  buyerTaxId: {title: '购买方的统一社会信用代码或纳税人识别号',order: 13,view: 'text', type: 'string',},
  reviewerUserId: {title: '审核人',order: 14,view: 'list', type: 'string',dictTable: "sys_user", dictCode: 'id', dictText: 'username',},
  reviewTime: {title: '审核时间',order: 15,view: 'datetime', type: 'string',},
  reviewDescription: {title: '审核描述',order: 16,view: 'textarea', type: 'string',},
  submitterUserId: {title: '提交人',order: 17,view: 'list', type: 'string',dictTable: "sys_user", dictCode: 'id', dictText: 'username',},
  submissionTime: {title: '提交时间',order: 18,view: 'datetime', type: 'string',},
  financialUserId: {title: '财务人',order: 19,view: 'list', type: 'string',dictTable: "sys_user", dictCode: 'id', dictText: 'username',},
  financialTime: {title: '财务审核时间',order: 20,view: 'datetime', type: 'string',},
  applyId: {title: '开票记录id',order: 21,view: 'list', type: 'string',dictTable: "c_invoice_apply", dictCode: 'id', dictText: 'username',},
  buildingAdd: {title: '建筑服务发生地',order: 22,view: 'text', type: 'string',},
  buildingName: {title: '建筑项目名称',order: 23,view: 'text', type: 'string',},
  companyId: {title: '开票主体--总包信息',order: 24,view: 'list', type: 'string',dictTable: "company_info", dictCode: 'id', dictText: 'company_name',},
  contractingId: {title: '收票主体--发包商',order: 25,view: 'list', type: 'string',dictTable: "c_contracting_unit", dictCode: 'id', dictText: 'name',},
};
